package com.weixing.mall.provider.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.weixing.mall.base.wrapper.Result;
import com.weixing.mall.base.wrapper.ResultUtil;
import com.weixing.mall.core.annotation.NoNeedAccess;
import com.weixing.mall.core.support.BaseController;
import com.weixing.mall.provider.model.vo.report.ActivityVo;
import com.weixing.mall.provider.model.vo.report.storage.*;
import com.weixing.mall.provider.service.IDayReportStorageService;
import com.weixing.mall.provider.util.EasyExcelUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @author jzy
 * @date 2020/6/5
 */
@RestController
@RequestMapping("report")
@Api(value = "后台报表APi", tags = "后台报表-仓储部报表")
public class ReportStorageController extends BaseController {

    @Autowired
    private IDayReportStorageService storageService;


    @ApiOperation(value = "02 仓储部--进出库存汇总表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "shipper", value = "发货员id",required = false, paramType = "query"),
            @ApiImplicitParam(name = "depotId", value = "仓库ID",required = false, paramType = "query"),
            @ApiImplicitParam(name = "yearMonth", value = "年月 例：2020-06",required = false, paramType = "query"),
            @ApiImplicitParam(name = "startTime", value = "开始时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "endTime", value = "结束时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "sortField", value = "排序字段",required = false, paramType = "query"),
            @ApiImplicitParam(name = "sortType", value = "排序类型  asc正序  desc倒序",required = false, paramType = "query")
    })
    @GetMapping("/storage/depot/summary")
    public Result<IPage<StorageInAndOutDepotSummaryVo>> storageInAndOutDepotSummary(Long shipper,Long depotId,String yearMonth,String startTime,String endTime,String sortField,String sortType){
        IPage<StorageInAndOutDepotSummaryVo> page = storageService.storageInAndOutDepotSummary(shipper,depotId,yearMonth,startTime, endTime, sortField, sortType, initMpPage());
        return ResultUtil.success(page);
    }
    @ApiOperation(value = "02 仓储部--进出库存汇总表-导出excel")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "shipper", value = "发货员id",required = false, paramType = "query"),
            @ApiImplicitParam(name = "depotId", value = "仓库ID",required = false, paramType = "query"),
            @ApiImplicitParam(name = "yearMonth", value = "年月 例：2020-06",required = false, paramType = "query"),
            @ApiImplicitParam(name = "startTime", value = "开始时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "endTime", value = "结束时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "sortField", value = "排序字段",required = false, paramType = "query"),
            @ApiImplicitParam(name = "sortType", value = "排序类型  asc正序  desc倒序",required = false, paramType = "query")
    })
    @GetMapping("/storage/depot/summary/excel")
    @NoNeedAccess
    public void storageInAndOutDepotSummaryExcel(Long shipper,Long depotId, String yearMonth, String startTime, String endTime, String sortField, String sortType, HttpServletResponse response){
        IPage<StorageInAndOutDepotSummaryVo> page = storageService.storageInAndOutDepotSummary(shipper,depotId,yearMonth,startTime, endTime, sortField, sortType, new Page(1,-1));
        try {
            EasyExcelUtil.writeExcel(response,StorageInAndOutDepotSummaryVo.class,page.getRecords(),"进出库存汇总表");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    @ApiOperation(value = "02 仓储部--进出库存汇总表-进库明细")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "type", value = "类型 1样衣 2大衣 3做货 4退货 5次品换货 6调拨 7盘点",required = false, paramType = "query"),
            @ApiImplicitParam(name = "shipper", value = "发货员id",required = false, paramType = "query"),
            @ApiImplicitParam(name = "depotId", value = "仓库ID",required = false, paramType = "query"),
            @ApiImplicitParam(name = "yearMonth", value = "年月 例：2020-06",required = false, paramType = "query"),
            @ApiImplicitParam(name = "startTime", value = "开始时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "endTime", value = "结束时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "sortField", value = "排序字段",required = false, paramType = "query"),
            @ApiImplicitParam(name = "sortType", value = "排序类型  asc正序  desc倒序",required = false, paramType = "query")
    })
    @GetMapping("/storage/depot/in/detail")
    public Result<IPage<StorageInDepotDetailVo>> storageInDepotDetail(Integer type,Long shipper,Long depotId,String yearMonth, String startTime,String endTime,String sortField,String sortType){
        IPage<StorageInDepotDetailVo> page = storageService.storageInDepotDetail(type, shipper, depotId,yearMonth, startTime, endTime, sortField, sortType, initMpPage());
        return ResultUtil.success(page);
    }
    @ApiOperation(value = "02 仓储部--进出库存汇总表-进库明细-导出excel")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "type", value = "类型 1样衣 2大衣 3做货 4退货 5次品换货 6调拨 7盘点",required = false, paramType = "query"),
            @ApiImplicitParam(name = "shipper", value = "发货员id",required = false, paramType = "query"),
            @ApiImplicitParam(name = "depotId", value = "仓库ID",required = false, paramType = "query"),
            @ApiImplicitParam(name = "yearMonth", value = "年月 例：2020-06",required = false, paramType = "query"),
            @ApiImplicitParam(name = "startTime", value = "开始时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "endTime", value = "结束时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "sortField", value = "排序字段",required = false, paramType = "query"),
            @ApiImplicitParam(name = "sortType", value = "排序类型  asc正序  desc倒序",required = false, paramType = "query")
    })
    @GetMapping("/storage/depot/in/detail/excel")
    @NoNeedAccess
    public void storageInDepotDetailExcel(Integer type,Long shipper,Long depotId,String yearMonth, String startTime,String endTime,String sortField,String sortType,HttpServletResponse response){
        IPage<StorageInDepotDetailVo> page = storageService.storageInDepotDetail(type, shipper, depotId,yearMonth, startTime, endTime, sortField, sortType, initMpPage());
        try {
            EasyExcelUtil.writeExcel(response,StorageInDepotDetailVo.class,page.getRecords(),"进库明细");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    @ApiOperation(value = "02 仓储部--进出库存汇总表-出库明细")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "type", value = "类型 1样衣 2大衣 3做货 4退货 5次品换货 6调拨 7盘点",required = false, paramType = "query"),
            @ApiImplicitParam(name = "shipper", value = "发货员id",required = false, paramType = "query"),
            @ApiImplicitParam(name = "depotId", value = "仓库ID",required = false, paramType = "query"),
            @ApiImplicitParam(name = "yearMonth", value = "年月 例：2020-06",required = false, paramType = "query"),
            @ApiImplicitParam(name = "startTime", value = "开始时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "endTime", value = "结束时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "sortField", value = "排序字段",required = false, paramType = "query"),
            @ApiImplicitParam(name = "sortType", value = "排序类型  asc正序  desc倒序",required = false, paramType = "query")
    })
    @GetMapping("/storage/depot/out/detail")
    public Result<IPage<StorageOutDepotDetailVo>> storageOutDepotDetail(Integer type,Long shipper,Long depotId,String yearMonth, String startTime,String endTime,String sortField,String sortType){
        IPage<StorageOutDepotDetailVo> page = storageService.storageOutDepotDetail(type, shipper, depotId,yearMonth, startTime, endTime, sortField, sortType, initMpPage());
        return ResultUtil.success(page);
    }
    @ApiOperation(value = "02 仓储部--进出库存汇总表-出库明细-导出excel")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "type", value = "类型 1样衣 2大衣 3做货 4退货 5次品换货 6调拨 7盘点",required = false, paramType = "query"),
            @ApiImplicitParam(name = "shipper", value = "发货员id",required = false, paramType = "query"),
            @ApiImplicitParam(name = "depotId", value = "仓库ID",required = false, paramType = "query"),
            @ApiImplicitParam(name = "yearMonth", value = "年月 例：2020-06",required = false, paramType = "query"),
            @ApiImplicitParam(name = "startTime", value = "开始时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "endTime", value = "结束时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "sortField", value = "排序字段",required = false, paramType = "query"),
            @ApiImplicitParam(name = "sortType", value = "排序类型  asc正序  desc倒序",required = false, paramType = "query")
    })
    @GetMapping("/storage/depot/out/detail/excel")
    @NoNeedAccess
    public void storageOutDepotDetailExcel(Integer type,Long shipper,Long depotId,String yearMonth, String startTime,String endTime,String sortField,String sortType,HttpServletResponse response){
        IPage<StorageOutDepotDetailVo> page = storageService.storageOutDepotDetail(type, shipper, depotId,yearMonth, startTime, endTime, sortField, sortType, new Page(1,-1));
        try {
            EasyExcelUtil.writeExcel(response,StorageOutDepotDetailVo.class,page.getRecords(),"出库明细");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    @ApiOperation(value = "03 仓储部--活动销售日报")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "yearMonth", value = "年月 2016-06",required = false, paramType = "query"),
            @ApiImplicitParam(name = "startTime", value = "开始时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "endTime", value = "结束时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "actId", value = "活动Id",required = false, paramType = "query"),
            @ApiImplicitParam(name = "sortField", value = "排序字段",required = false, paramType = "query"),
            @ApiImplicitParam(name = "sortType", value = "排序类型  asc正序  desc倒序",required = false, paramType = "query")
    })
    @GetMapping("/storage/activity/sales")
    public Result<IPage<StorageActivitySalesVo>> activitySalesReport(String yearMonth,String startTime,String endTime,Long actId,String sortField,String sortType){
        IPage<StorageActivitySalesVo> page = storageService.activitySalesReport(yearMonth, startTime, endTime, actId, sortField, sortType, initMPage());
        return ResultUtil.success(page);
    }
    @ApiOperation(value = "03 仓储部--活动销售日报-导出excel")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "yearMonth", value = "年月 2016-06",required = false, paramType = "query"),
            @ApiImplicitParam(name = "startTime", value = "开始时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "endTime", value = "结束时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "actId", value = "活动Id",required = false, paramType = "query"),
            @ApiImplicitParam(name = "sortField", value = "排序字段",required = false, paramType = "query"),
            @ApiImplicitParam(name = "sortType", value = "排序类型  asc正序  desc倒序",required = false, paramType = "query")
    })
    @GetMapping("/storage/activity/sales/excel")
    @NoNeedAccess
    public void activitySalesReportExcel(String yearMonth,String startTime,String endTime,Long actId,String sortField,String sortType,HttpServletResponse response){
        IPage<StorageActivitySalesVo> page = storageService.activitySalesReport(yearMonth, startTime, endTime, actId, sortField, sortType, new Page(1,-1));
        try {
            EasyExcelUtil.writeExcel(response,StorageActivitySalesVo.class,page.getRecords(),"活动销售日报");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    @ApiOperation(value = "03 仓储部--活动销售日报-详细数据")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "type", value = "类型 1-APP仓库销售数量 2-APP仓断货数量 3-APP仓取消数量 4-ERP仓销售数量 5-ERP仓断货数量",required = false, paramType = "query"),
            @ApiImplicitParam(name = "itemStatus", value = "操作状态 1待定 2带货 3有现货 4需外采 5内部换货 6断货 7取消 8待处理 9退货",required = false, paramType = "query"),
            @ApiImplicitParam(name = "userName", value = "用户名",required = false, paramType = "query"),
            @ApiImplicitParam(name = "startTime", value = "开始时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "endTime", value = "结束时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "actId", value = "活动Id",required = false, paramType = "query"),
            @ApiImplicitParam(name = "depotCode", value = "仓库code  APP（app仓库） ERP(ERP仓库) OUT(外采仓库) FHB（发货部仓库） CP(次品仓库)",required = false, paramType = "query"),
            @ApiImplicitParam(name = "sortField", value = "排序字段",required = false, paramType = "query"),
            @ApiImplicitParam(name = "sortType", value = "排序类型  asc正序  desc倒序",required = false, paramType = "query")
    })
    @GetMapping("/storage/activity/sales/detail")
    public Result<IPage<StorageActivitySalesDetailVo>> activitySalesReportDetail(Integer type,Integer itemStatus,String userName, String startTime, String endTime, Long actId,String depotCode, String sortField, String sortType){
        IPage<StorageActivitySalesDetailVo> page = storageService.activitySalesReportDetail(type, itemStatus, userName, startTime, endTime, actId, depotCode, sortField, sortType, initMpPage());
        return ResultUtil.success(page);
    }
    @ApiOperation(value = "03 仓储部--活动销售日报-详细数据-导出excel")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "type", value = "类型 1-APP仓库销售数量 2-APP仓断货数量 3-APP仓取消数量 4-ERP仓销售数量 5-ERP仓断货数量",required = false, paramType = "query"),
            @ApiImplicitParam(name = "itemStatus", value = "操作状态 1待定 2带货 3有现货 4需外采 5内部换货 6断货 7取消 8待处理 9退货",required = false, paramType = "query"),
            @ApiImplicitParam(name = "userName", value = "用户名",required = false, paramType = "query"),
            @ApiImplicitParam(name = "startTime", value = "开始时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "endTime", value = "结束时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "actId", value = "活动Id",required = false, paramType = "query"),
            @ApiImplicitParam(name = "depotCode", value = "仓库code  APP（app仓库） ERP(ERP仓库) OUT(外采仓库) FHB（发货部仓库） CP(次品仓库)",required = false, paramType = "query"),
            @ApiImplicitParam(name = "sortField", value = "排序字段",required = false, paramType = "query"),
            @ApiImplicitParam(name = "sortType", value = "排序类型  asc正序  desc倒序",required = false, paramType = "query")
    })
    @GetMapping("/storage/activity/sales/detail/excel")
    @NoNeedAccess
    public void activitySalesReportDetailExcel(Integer type,Integer itemStatus,String userName, String startTime, String endTime, Long actId,String depotCode, String sortField, String sortType,HttpServletResponse response){
        IPage<StorageActivitySalesDetailVo> page = storageService.activitySalesReportDetail(type, itemStatus, userName, startTime, endTime, actId, depotCode, sortField, sortType, new Page(1,-1));
        try {
            EasyExcelUtil.writeExcel(response,StorageActivitySalesDetailVo.class,page.getRecords(),"活动销售明细");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    @ApiOperation(value = "04 仓储部--做货样衣报表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "type", value = "类型 1样衣 3做货",required = false, paramType = "query"),
            @ApiImplicitParam(name = "depotId", value = "仓库ID",required = false, paramType = "query"),
            @ApiImplicitParam(name = "yearMonth", value = "年月 例：2020-06",required = false, paramType = "query"),
            @ApiImplicitParam(name = "startTime", value = "开始时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "endTime", value = "结束时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "sortField", value = "排序字段",required = false, paramType = "query"),
            @ApiImplicitParam(name = "sortType", value = "排序类型  asc正序  desc倒序",required = false, paramType = "query")
    })
    @GetMapping("/storage/do/sample")
    public Result<IPage<StorageDoSampleVo>> storageDoAndSample(Integer type,Long depotId,String yearMonth,String startTime,String endTime,String sortField,String sortType){
        IPage<StorageDoSampleVo> page = storageService.storageDoAndSample(type,depotId, yearMonth, startTime, endTime, sortField, sortType, initMpPage());
        return ResultUtil.success(page);
    }
    @ApiOperation(value = "04 仓储部--做货样衣报表-导出excel")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "type", value = "类型 1样衣 3做货",required = false, paramType = "query"),
            @ApiImplicitParam(name = "depotId", value = "仓库ID",required = false, paramType = "query"),
            @ApiImplicitParam(name = "yearMonth", value = "年月 例：2020-06",required = false, paramType = "query"),
            @ApiImplicitParam(name = "startTime", value = "开始时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "endTime", value = "结束时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "sortField", value = "排序字段",required = false, paramType = "query"),
            @ApiImplicitParam(name = "sortType", value = "排序类型  asc正序  desc倒序",required = false, paramType = "query")
    })
    @GetMapping("/storage/do/sample/excel")
    @NoNeedAccess
    public void storageDoAndSampleExcel(Integer type,Long depotId,String yearMonth,String startTime,String endTime,String sortField,String sortType,HttpServletResponse response){
        IPage<StorageDoSampleVo> page = storageService.storageDoAndSample(type,depotId, yearMonth, startTime, endTime, sortField, sortType, new Page(1,-1));
        try {
            EasyExcelUtil.writeExcel(response,StorageDoSampleVo.class,page.getRecords(),"做货样衣报表");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    @ApiOperation(value = "05 仓储部-换货报表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "roleType", value = "角色类型",required = false, paramType = "query"),
            @ApiImplicitParam(name = "agentId", value = "代理商Id",required = false, paramType = "query"),
            @ApiImplicitParam(name = "role", value = "角色 1客服下单，2代理商下单，3客户下单",required = false, paramType = "query"),
            @ApiImplicitParam(name = "userName", value = "用户名",required = false, paramType = "query"),
            @ApiImplicitParam(name = "auditStartTime", value = "审核开始时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "auditEndTime", value = "审核结束时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "exchangeStartTime", value = "换货开始时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "exchangeEndTime", value = "换货结束时间",required = false, paramType = "query")
    })
    @GetMapping("/storage/exchange")
    public Result<IPage<StorageExchangeReportVo>> exchangeReport(Integer roleType,Long agentId,Integer role,String userName,String auditStartTime,String auditEndTime,String exchangeStartTime,String exchangeEndTime){
        IPage<StorageExchangeReportVo> page = storageService.exchangeReport(roleType, agentId, role, userName, auditStartTime, auditEndTime, exchangeStartTime, exchangeEndTime, initMpPage());
        return ResultUtil.success(page);
    }
    @ApiOperation(value = "05 仓储部-换货报表-导出excel")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "roleType", value = "角色类型",required = false, paramType = "query"),
            @ApiImplicitParam(name = "agentId", value = "代理商Id",required = false, paramType = "query"),
            @ApiImplicitParam(name = "role", value = "角色 1客服下单，2代理商下单，3客户下单",required = false, paramType = "query"),
            @ApiImplicitParam(name = "userName", value = "用户名",required = false, paramType = "query"),
            @ApiImplicitParam(name = "auditStartTime", value = "审核开始时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "auditEndTime", value = "审核结束时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "exchangeStartTime", value = "换货开始时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "exchangeEndTime", value = "换货结束时间",required = false, paramType = "query")
    })
    @GetMapping("/storage/exchange/excel")
    @NoNeedAccess
    public void exchangeReportExcel(Integer roleType,Long agentId,Integer role,String userName,String auditStartTime,String auditEndTime,String exchangeStartTime,String exchangeEndTime,HttpServletResponse response){
        IPage<StorageExchangeReportVo> page = storageService.exchangeReport(roleType, agentId, role, userName, auditStartTime, auditEndTime, exchangeStartTime, exchangeEndTime, new Page(1,-1));
        try {
            EasyExcelUtil.writeExcel(response,StorageExchangeReportVo.class,page.getRecords(),"换货报表");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    @ApiOperation(value = "05 仓储部-换货报表2-2020年10月28日客户提出新的展示数据需求")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "orderSn", value = "订单编号",required = false, paramType = "query"),
            @ApiImplicitParam(name = "userInfo", value = "客户信息",required = false, paramType = "query"),
            @ApiImplicitParam(name = "agentName", value = "所属代理",required = false, paramType = "query"),
            @ApiImplicitParam(name = "customerName", value = "所属客服",required = false, paramType = "query"),
            @ApiImplicitParam(name = "goodsSn", value = "货号",required = false, paramType = "query"),
            @ApiImplicitParam(name = "shipperName", value = "发货员",required = false, paramType = "query"),
            @ApiImplicitParam(name = "orderType", value = "订单类型",required = false, paramType = "query"),
            @ApiImplicitParam(name = "actName", value = "活动名称",required = false, paramType = "query"),
            @ApiImplicitParam(name = "orderStatus", value = "订单状态",required = false, paramType = "query"),
            @ApiImplicitParam(name = "sysTag", value = "标签状态",required = false, paramType = "query"),
            @ApiImplicitParam(name = "auditStartTime", value = "审核开始时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "auditEndTime", value = "审核结束时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "receiveStartTime", value = "换货开始时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "receiveEndTime", value = "换货结束时间",required = false, paramType = "query")
    })
    @GetMapping("/storage/exchange2")
    public Result<IPage<StorageExchangeReport2Vo>> exchangeReport2
            (String orderSn,String userInfo,String agentName,String customerName,String goodsSn,String shipperName,Integer orderType,String actName,Integer orderStatus
              ,Integer sysTag,String auditStartTime,String auditEndTime,String receiveStartTime,String receiveEndTime){
        IPage<StorageExchangeReport2Vo> page = storageService.exchangeReport2(orderSn,userInfo,agentName,customerName,goodsSn,shipperName,orderType,
                actName,orderStatus,sysTag,auditStartTime,auditEndTime,receiveStartTime,receiveEndTime,initMpPage());
        return ResultUtil.success(page);
    }
    @ApiOperation(value = "05 仓储部-换货报表-导出excel2")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "orderSn", value = "订单编号",required = false, paramType = "query"),
            @ApiImplicitParam(name = "userInfo", value = "客户信息",required = false, paramType = "query"),
            @ApiImplicitParam(name = "agentName", value = "所属代理",required = false, paramType = "query"),
            @ApiImplicitParam(name = "customerName", value = "所属客服",required = false, paramType = "query"),
            @ApiImplicitParam(name = "goodsSn", value = "货号",required = false, paramType = "query"),
            @ApiImplicitParam(name = "shipperName", value = "发货员",required = false, paramType = "query"),
            @ApiImplicitParam(name = "orderType", value = "订单类型",required = false, paramType = "query"),
            @ApiImplicitParam(name = "actName", value = "活动名称",required = false, paramType = "query"),
            @ApiImplicitParam(name = "orderStatus", value = "订单状态",required = false, paramType = "query"),
            @ApiImplicitParam(name = "sysTag", value = "标签状态",required = false, paramType = "query"),
            @ApiImplicitParam(name = "auditStartTime", value = "审核开始时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "auditEndTime", value = "审核结束时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "receiveStartTime", value = "换货开始时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "receiveEndTime", value = "换货结束时间",required = false, paramType = "query")
    })
    @GetMapping("/storage/exchange/excel2")
    @NoNeedAccess
    public void exchangeReportExcel2(String orderSn,String userInfo,String agentName,String customerName,String goodsSn,String shipperName,Integer orderType,String actName,Integer orderStatus
            ,Integer sysTag,String auditStartTime,String auditEndTime,String receiveStartTime,String receiveEndTime,HttpServletResponse response){
        IPage<StorageExchangeReport2Vo> page = storageService.exchangeReport2(orderSn,userInfo,agentName,customerName,goodsSn,shipperName,orderType,
                actName,orderStatus,sysTag,auditStartTime,auditEndTime,receiveStartTime,receiveEndTime,initMpPage());
        try {
            EasyExcelUtil.writeExcel(response,StorageExchangeReport2Vo.class,page.getRecords(),"换货报表");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    @ApiOperation(value = "06 仓储部-退货报表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "roleType", value = "角色类型",required = false, paramType = "query"),
            @ApiImplicitParam(name = "agentId", value = "代理商Id",required = false, paramType = "query"),
            @ApiImplicitParam(name = "goodsSn", value = "商品货号",required = false, paramType = "query"),
            @ApiImplicitParam(name = "userName", value = "客户名称",required = false, paramType = "query"),
            @ApiImplicitParam(name = "catId", value = "分类",required = false, paramType = "query"),
            @ApiImplicitParam(name = "orderType", value = "订单类型 1正价订单  2代理商活动订单 3秒杀活动订单",required = false, paramType = "query"),
            @ApiImplicitParam(name = "actId", value = "活动Id",required = false, paramType = "query"),
            @ApiImplicitParam(name = "buyer", value = "下单人",required = false, paramType = "query"),
            @ApiImplicitParam(name = "orderSn", value = "订单号",required = false, paramType = "query"),
            @ApiImplicitParam(name = "mobile", value = "手机号",required = false, paramType = "query"),
            @ApiImplicitParam(name = "startTime", value = "开始时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "endTime", value = "结束时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "receiveRemark", value = "接收备注",required = false, paramType = "query")
    })
    @GetMapping("/storage/regular/return")
    public Result<IPage<StorageRegularReturnVo>> regularReturnReport(Integer roleType,Long agentId,String goodsSn,String userName,Integer orderType,Long actId,Long catId,String buyer,String orderSn,String mobile,String startTime,String endTime,String receiveRemark){
        IPage<StorageRegularReturnVo> page = storageService.regularReturnReport(roleType, agentId, goodsSn, userName,orderType,actId, catId, buyer, orderSn, mobile, startTime, endTime,receiveRemark, initMpPage());
        return ResultUtil.success(page);
    }
    @ApiOperation(value = "06 仓储部-退货报表-导出excel")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "roleType", value = "角色类型",required = false, paramType = "query"),
            @ApiImplicitParam(name = "agentId", value = "代理商Id",required = false, paramType = "query"),
            @ApiImplicitParam(name = "goodsSn", value = "商品货号",required = false, paramType = "query"),
            @ApiImplicitParam(name = "userName", value = "客户名称",required = false, paramType = "query"),
            @ApiImplicitParam(name = "orderType", value = "订单类型  1正价订单  2代理商活动订单 3秒杀活动订单",required = false, paramType = "query"),
            @ApiImplicitParam(name = "actId", value = "活动Id",required = false, paramType = "query"),
            @ApiImplicitParam(name = "catId", value = "分类",required = false, paramType = "query"),
            @ApiImplicitParam(name = "buyer", value = "下单人",required = false, paramType = "query"),
            @ApiImplicitParam(name = "orderSn", value = "订单号",required = false, paramType = "query"),
            @ApiImplicitParam(name = "mobile", value = "手机号",required = false, paramType = "query"),
            @ApiImplicitParam(name = "startTime", value = "开始时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "endTime", value = "结束时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "receiveRemark", value = "接收备注",required = false, paramType = "query")
    })
    @GetMapping("/storage/regular/return/excel")
    @NoNeedAccess
    public void regularReturnReportExcel(Integer roleType,Long agentId,String goodsSn,String userName,Integer orderType,Long actId,Long catId,String buyer,String orderSn,String mobile,String startTime,String endTime,String receiveRemark,HttpServletResponse response){
        IPage<StorageRegularReturnVo> page = storageService.regularReturnReport(roleType, agentId, goodsSn, userName, orderType,actId,catId, buyer, orderSn, mobile, startTime, endTime,receiveRemark, new Page(1,-1));
        try {
            EasyExcelUtil.writeExcel(response,StorageRegularReturnVo.class,page.getRecords(),"正价退货报表");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    @ApiOperation(value = "06-2 仓储部-退货报表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "roleType", value = "角色类型",required = false, paramType = "query"),
            @ApiImplicitParam(name = "agentId", value = "代理商Id",required = false, paramType = "query"),
            @ApiImplicitParam(name = "goodsSn", value = "商品货号",required = false, paramType = "query"),
            @ApiImplicitParam(name = "userName", value = "客户名称",required = false, paramType = "query"),
            @ApiImplicitParam(name = "catId", value = "分类",required = false, paramType = "query"),
            @ApiImplicitParam(name = "orderType", value = "订单类型 1正价订单  2代理商活动订单 3秒杀活动订单",required = false, paramType = "query"),
            @ApiImplicitParam(name = "actId", value = "活动Id",required = false, paramType = "query"),
            @ApiImplicitParam(name = "buyer", value = "下单人",required = false, paramType = "query"),
            @ApiImplicitParam(name = "orderSn", value = "订单号",required = false, paramType = "query"),
            @ApiImplicitParam(name = "mobile", value = "手机号",required = false, paramType = "query"),
            @ApiImplicitParam(name = "startTime", value = "开始时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "endTime", value = "结束时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "receiveRemark", value = "接收备注",required = false, paramType = "query"),
            @ApiImplicitParam(name = "findState", value = "查询状态 1（接收）、2（审核）、3（质检）",required = false, paramType = "query")
    })
    @GetMapping("/storage/regular/return2")
    public Result<IPage<StorageRegularReturnVo>> regularReturnReport2(Integer roleType,Long agentId,String goodsSn,String userName,Integer orderType,Long actId,Long catId,String buyer,String orderSn,String mobile,String startTime,String endTime,String receiveRemark,Integer findState){
        IPage<StorageRegularReturnVo> page = storageService.regularReturnReport2(roleType, agentId, goodsSn, userName,orderType,actId, catId, buyer, orderSn, mobile, startTime, endTime,receiveRemark,findState, initMpPage());
        return ResultUtil.success(page);
    }

    @ApiOperation(value = "06-2 仓储部-退货报表-导出excel")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "roleType", value = "角色类型",required = false, paramType = "query"),
            @ApiImplicitParam(name = "agentId", value = "代理商Id",required = false, paramType = "query"),
            @ApiImplicitParam(name = "goodsSn", value = "商品货号",required = false, paramType = "query"),
            @ApiImplicitParam(name = "userName", value = "客户名称",required = false, paramType = "query"),
            @ApiImplicitParam(name = "orderType", value = "订单类型  1正价订单  2代理商活动订单 3秒杀活动订单",required = false, paramType = "query"),
            @ApiImplicitParam(name = "actId", value = "活动Id",required = false, paramType = "query"),
            @ApiImplicitParam(name = "catId", value = "分类",required = false, paramType = "query"),
            @ApiImplicitParam(name = "buyer", value = "下单人",required = false, paramType = "query"),
            @ApiImplicitParam(name = "orderSn", value = "订单号",required = false, paramType = "query"),
            @ApiImplicitParam(name = "mobile", value = "手机号",required = false, paramType = "query"),
            @ApiImplicitParam(name = "startTime", value = "开始时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "endTime", value = "结束时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "receiveRemark", value = "接收备注",required = false, paramType = "query"),
            @ApiImplicitParam(name = "findState", value = "查询状态 1（接收）、2（审核）、3（质检）",required = false, paramType = "query")
    })
    @GetMapping("/storage/regular/return/excel2")
    @NoNeedAccess
    public void regularReturnReportExcel2(Integer roleType,Long agentId,String goodsSn,String userName,Integer orderType,Long actId,Long catId,String buyer,String orderSn,String mobile,String startTime,String endTime,String receiveRemark,Integer findState,HttpServletResponse response){
        IPage<StorageRegularReturnVo> page = storageService.regularReturnReport2(roleType, agentId, goodsSn, userName, orderType,actId,catId, buyer, orderSn, mobile, startTime, endTime,receiveRemark,findState, new Page(1,-1));
        try {
            EasyExcelUtil.writeExcel(response,StorageRegularReturnVo.class,page.getRecords(),"正价退货报表");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    @ApiOperation(value = "07 仓储部-出入库报表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "billType", value = "出入库类型  1入库 2出库",required = false, paramType = "query"),
            @ApiImplicitParam(name = "catId", value = "类型Id",required = false, paramType = "query"),
            @ApiImplicitParam(name = "goodsSn", value = "货号",required = false, paramType = "query"),
            @ApiImplicitParam(name = "styleNo", value = "款号",required = false, paramType = "query"),
            @ApiImplicitParam(name = "startTime", value = "开始时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "endTime", value = "结束时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "sortField", value = "排序字段",required = false, paramType = "query"),
            @ApiImplicitParam(name = "sortType", value = "排序类型  asc正序  desc倒序",required = false, paramType = "query")
    })
    @GetMapping("/storage/out/in")
    public Result<IPage<StorageOutAndInReportVo>> outAndInReport(Integer billType,Long catId,String goodsSn,String styleNo,String startTime,String endTime,String sortField, String sortType){
        IPage<StorageOutAndInReportVo> page = storageService.outAndInReport(billType, catId, goodsSn, styleNo, startTime, endTime, sortField, sortType, initMpPage());
        return ResultUtil.success(page);
    }
    @ApiOperation(value = "07 仓储部-出入库报表-导出excel")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "billType", value = "出入库类型  1入库 2出库",required = false, paramType = "query"),
            @ApiImplicitParam(name = "catId", value = "类型Id",required = false, paramType = "query"),
            @ApiImplicitParam(name = "goodsSn", value = "货号",required = false, paramType = "query"),
            @ApiImplicitParam(name = "styleNo", value = "款号",required = false, paramType = "query"),
            @ApiImplicitParam(name = "startTime", value = "开始时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "endTime", value = "结束时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "sortField", value = "排序字段",required = false, paramType = "query"),
            @ApiImplicitParam(name = "sortType", value = "排序类型  asc正序  desc倒序",required = false, paramType = "query")
    })
    @GetMapping("/storage/out/in/excel")
    @NoNeedAccess
    public void outAndInReportExcel(Integer billType,Long catId,String goodsSn,String styleNo,String startTime,String endTime,String sortField, String sortType,HttpServletResponse response){
        IPage<StorageOutAndInReportVo> page = storageService.outAndInReport(billType, catId, goodsSn, styleNo, startTime, endTime, sortField, sortType, new Page(1,-1));
        try {
            EasyExcelUtil.writeExcel(response,StorageOutAndInReportVo.class,page.getRecords(),"出入库报表");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    @ApiOperation(value = "08 仓储部-次品报表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "roleType", value = "角色类型",required = false, paramType = "query"),
            @ApiImplicitParam(name = "customerId", value = "客服Id",required = false, paramType = "query"),
            @ApiImplicitParam(name = "agentId", value = "代理商Id",required = false, paramType = "query"),
            @ApiImplicitParam(name = "startTime", value = "开始时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "endTime", value = "结束时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "sortField", value = "排序字段",required = false, paramType = "query"),
            @ApiImplicitParam(name = "sortType", value = "排序类型  asc正序  desc倒序",required = false, paramType = "query")
    })
    @GetMapping("/storage/defect")
    public Result<IPage<StorageDefectReportVo>> defectReport(Integer roleType,Long customerId,Long agentId,String startTime,String endTime,String sortField,String sortType){
        IPage<StorageDefectReportVo> page = storageService.defectReport(roleType,customerId, agentId, startTime, endTime, sortField, sortType, initMpPage());
        return ResultUtil.success(page);
    }
    @ApiOperation(value = "08 仓储部-次品报表-导出excel")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "roleType", value = "角色类型",required = false, paramType = "query"),
            @ApiImplicitParam(name = "customerId", value = "客服Id",required = false, paramType = "query"),
            @ApiImplicitParam(name = "agentId", value = "代理商Id",required = false, paramType = "query"),
            @ApiImplicitParam(name = "startTime", value = "开始时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "endTime", value = "结束时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "sortField", value = "排序字段",required = false, paramType = "query"),
            @ApiImplicitParam(name = "sortType", value = "排序类型  asc正序  desc倒序",required = false, paramType = "query")
    })
    @GetMapping("/storage/defect/excel")
    @NoNeedAccess
    public void defectReportExcel(Integer roleType,Long customerId,Long agentId,String startTime,String endTime,String sortField,String sortType,HttpServletResponse response){
        IPage<StorageDefectReportVo> page = storageService.defectReport(roleType, customerId, agentId, startTime, endTime, sortField, sortType, new Page(1,-1));
        try {
            EasyExcelUtil.writeExcel(response,StorageDefectReportVo.class,page.getRecords(),"次品报表");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    @ApiOperation(value = "08 仓储部-次品报表-详细数据")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "roleType", value = "角色类型",required = false, paramType = "query"),
            @ApiImplicitParam(name = "agentId", value = "代理商Id",required = false, paramType = "query"),
            @ApiImplicitParam(name = "customerId", value = "客服Id",required = false, paramType = "query"),
            @ApiImplicitParam(name = "orderSn", value = "订单编号",required = false, paramType = "query"),
            @ApiImplicitParam(name = "agentName", value = "代理名称",required = false, paramType = "query"),
            @ApiImplicitParam(name = "contactUser", value = "客户名称",required = false, paramType = "query"),
            @ApiImplicitParam(name = "mobile", value = "手机号",required = false, paramType = "query"),
            @ApiImplicitParam(name = "type", value = "问题类型 1瑕疵 2问题订单",required = false, paramType = "query"),
            @ApiImplicitParam(name = "startTime", value = "开始时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "endTime", value = "结束时间",required = false, paramType = "query")
    })
    @GetMapping("/storage/defect/detail")
    public Result<IPage<StorageDefectReportDetailVo>> defectReportDetail(String orderSn,Long customerId,Integer roleType,Long agentId,Integer type,String startTime,String endTime,
                                                                         String agentName,String contactUser,String mobile){
        IPage<StorageDefectReportDetailVo> page = storageService.defectReportDetail( orderSn, customerId,roleType, agentId, type, startTime, endTime,agentName,contactUser,mobile, initMpPage());
        return ResultUtil.success(page);
    }
    @ApiOperation(value = "08 仓储部-次品报表-详细数据-导出excel")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "roleType", value = "角色类型",required = false, paramType = "query"),
            @ApiImplicitParam(name = "agentId", value = "代理商Id",required = false, paramType = "query"),
            @ApiImplicitParam(name = "customerId", value = "客服Id",required = false, paramType = "query"),
            @ApiImplicitParam(name = "orderSn", value = "订单编号",required = false, paramType = "query"),
            @ApiImplicitParam(name = "agentName", value = "代理名称",required = false, paramType = "query"),
            @ApiImplicitParam(name = "contactUser", value = "客户名称",required = false, paramType = "query"),
            @ApiImplicitParam(name = "mobile", value = "手机号",required = false, paramType = "query"),
            @ApiImplicitParam(name = "type", value = "问题类型 1瑕疵 2问题订单",required = false, paramType = "query"),
            @ApiImplicitParam(name = "startTime", value = "开始时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "endTime", value = "结束时间",required = false, paramType = "query")
    })
    @GetMapping("/storage/defect/detail/excel")
    @NoNeedAccess
    public void defectReportDetailExcel(String orderSn,Long customerId,Integer roleType,Long agentId,Integer type,String startTime,String endTime,
                                        String agentName,String contactUser,String mobile,HttpServletResponse response){
        IPage<StorageDefectReportDetailVo> page = storageService.defectReportDetail( orderSn, customerId,roleType, agentId, type, startTime, endTime,agentName,contactUser,mobile, new Page(1,-1));
        try {
            EasyExcelUtil.writeExcel(response,StorageDefectReportDetailVo.class,page.getRecords(),"次品明细");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    @ApiOperation(value = "09 仓储部-库存截留报表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "orderType", value = "订单类型 1正价 2代理商活动 3秒杀活动",required = false, paramType = "query"),
            @ApiImplicitParam(name = "agentType", value = "代理商等级（金银级）1金级 2银级",required = false, paramType = "query"),
            @ApiImplicitParam(name = "actId", value = "活动ID",required = false, paramType = "query"),
            @ApiImplicitParam(name = "startTime", value = "开始时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "endTime", value = "结束时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "sortField", value = "排序字段",required = false, paramType = "query"),
            @ApiImplicitParam(name = "sortType", value = "排序类型  asc正序  desc倒序",required = false, paramType = "query")
    })
    @GetMapping("/storage/intercept")
    public Result<IPage<StorageInterceptVo>> storageIntercept(Integer orderType, Integer agentType,Long actId,String startTime,String endTime,String sortField,String sortType){
        IPage<StorageInterceptVo> page = storageService.storageIntercept(orderType, agentType,actId, startTime, endTime, sortField, sortType, initMpPage());
        return ResultUtil.success(page);
    }
    @ApiOperation(value = "09 仓储部-库存截留报表-导出excel")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "orderType", value = "订单类型 1正价 2代理商活动 3秒杀活动",required = false, paramType = "query"),
            @ApiImplicitParam(name = "agentType", value = "代理商等级（金银级）1金级 2银级",required = false, paramType = "query"),
            @ApiImplicitParam(name = "actId", value = "活动ID",required = false, paramType = "query"),
            @ApiImplicitParam(name = "startTime", value = "开始时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "endTime", value = "结束时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "sortField", value = "排序字段",required = false, paramType = "query"),
            @ApiImplicitParam(name = "sortType", value = "排序类型  asc正序  desc倒序",required = false, paramType = "query")
    })
    @GetMapping("/storage/intercept/excel")
    @NoNeedAccess
    public void storageInterceptExcel(Integer orderType, Integer agentType,Long actId,String startTime,String endTime,String sortField,String sortType,HttpServletResponse response){
        IPage<StorageInterceptVo> page = storageService.storageIntercept(orderType, agentType, actId,startTime, endTime, sortField, sortType, new Page(1,-1));
        try {
            EasyExcelUtil.writeExcel(response,StorageInterceptVo.class,page.getRecords(),"库存截留报表");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    @ApiOperation(value = "09 仓储部-库存截留报表-详细数据")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "customerId", value = "客服Id",required = false, paramType = "query"),
            @ApiImplicitParam(name = "orderType", value = "订单类型 1正价 2代理商活动 3秒杀活动",required = false, paramType = "query"),
            @ApiImplicitParam(name = "agentType", value = "代理商等级（金银级）1金级 2银级",required = false, paramType = "query"),
            @ApiImplicitParam(name = "startTime", value = "开始时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "endTime", value = "结束时间",required = false, paramType = "query")
    })
    @GetMapping("/storage/intercept/detail")
    public Result<IPage<StorageInterceptDetailVo>> storageInterceptDetail(Long customerId,Integer orderType,Integer agentType,String startTime,String endTime){
        IPage<StorageInterceptDetailVo> page = storageService.storageInterceptDetail(customerId, orderType, agentType, startTime, endTime, initMpPage());
        return ResultUtil.success(page);
    }
    @ApiOperation(value = "09 仓储部-库存截留报表-详细数据-导出excel")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "customerId", value = "客服Id",required = false, paramType = "query"),
            @ApiImplicitParam(name = "orderType", value = "订单类型 1正价 2代理商活动 3秒杀活动",required = false, paramType = "query"),
            @ApiImplicitParam(name = "agentType", value = "代理商等级（金银级）1金级 2银级",required = false, paramType = "query"),
            @ApiImplicitParam(name = "startTime", value = "开始时间",required = false, paramType = "query"),
            @ApiImplicitParam(name = "endTime", value = "结束时间",required = false, paramType = "query")
    })
    @GetMapping("/storage/intercept/detail/excel")
    @NoNeedAccess
    public void storageInterceptDetailExcel(Long customerId,Integer orderType,Integer agentType,String startTime,String endTime,HttpServletResponse response){
        IPage<StorageInterceptDetailVo> page = storageService.storageInterceptDetail(customerId, orderType, agentType, startTime, endTime, new Page(1,-1));
        try {
            EasyExcelUtil.writeExcel(response,StorageInterceptDetailVo.class,page.getRecords(),"库存截留明细");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    @ApiOperation(value = "10 仓储部-获取所有活动")
    @GetMapping("/activity/list")
    @NoNeedAccess
    public Result<List<ActivityVo>> activityList(Integer type){
        List<ActivityVo> list = storageService.activityList(type);
        return ResultUtil.success(list);
    }
}
